import request from './request.js'

// 用户管理模块接口集合

/**
 * 注册
 * @param {Object} data 注册信息DTO
 */
export const register = (data) => {
	return request.post('/manager/users/register', data)
}

/**
 * 获取用户分页信息
 * @param {Object} data 用户分页查询DTO
 */
export const getUsersPage = (data) => {
	return request.post('/manager/users/page', data)
}

/**
 * 锁定用户
 * @param {String} id 用户ID
 */
export const lockedUser = (id) => {
	return request.put(`/manager/users/locked/${id}`)
}

/**
 * 解锁用户
 * @param {String} id 用户ID
 */
export const unlockUser = (id) => {
	return request.put(`/manager/users/unlock/${id}`)
}

/**
 * 获取用户个人信息
 * @param {String} id 用户ID
 */
export const getUserinfo = (id) => {
	return request.get(`/manager/users/${id}`)
}